package com.juren.jrdemo.controller;


import com.juren.jrdemo.JrdemoApplication;
import com.juren.jrdemo.entity.User;
import com.juren.jrdemo.service.IUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhangtao
 * @since 2018-12-27
 */
@Controller
@RequestMapping("/user")
public class UserController {
    private static final Logger logger = LoggerFactory.getLogger(JrdemoApplication.class);

    @Autowired
    private IUserService iUserService;

    @RequestMapping("/findAll")
    public void findAll() {
        logger.info("===开始查询===");
        List<User> list = iUserService.findAll();
        logger.info("===查询成功===,共'"+list.size()+"'条数据");
    }
}

